Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Integration tests on filters and distinct #238

Merged
merged 3 commits into from
Jun 17, 2021
Merged

Conversation

ManyTheFish
Copy link
Member

@ManyTheFish ManyTheFish commented Jun 17, 2021

Fix #216
Fix #120

@ManyTheFish ManyTheFish force-pushed the filter-integration-test branch from 317a3fe to f496cd3 Compare June 17, 2021 12:33
@ManyTheFish ManyTheFish requested a review from Kerollmops June 17, 2021 12:35
@ManyTheFish ManyTheFish changed the title Add test on filters Integration tests on filters and distinct Jun 17, 2021
fn $func() {
let criteria = vec![Words, Typo, Proximity, Attribute, Exactness];
let index = search::setup_search_index_with_criteria(&criteria);
let mut rtxn = index.read_txn().unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let mut rtxn = index.read_txn().unwrap();
let rtxn = index.read_txn().unwrap();

.unwrap()
.unwrap();

let mut search = Search::new(&mut rtxn, &index);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let mut search = Search::new(&mut rtxn, &index);
let mut search = Search::new(&rtxn, &index);

fn execute_filter(filter: &str, document: &TestDocument) -> Option<String> {
let mut id = None;
if let Some((field, filter)) = filter.split_once("=") {
println!("eq on field {} with filter {}", field, filter);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
println!("eq on field {} with filter {}", field, filter);

Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@bors
Copy link
Contributor

bors bot commented Jun 17, 2021

Build succeeded:

@bors bors bot merged commit a9e552a into main Jun 17, 2021
@bors bors bot deleted the filter-integration-test branch June 17, 2021 15:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for facets and distinct Test the relevancy
2 participants